guint extensions_checked : 1;
guint debug_enabled : 1;
guint forward_compatible : 1;
+ guint is_legacy : 1;
GdkGLContextPaintData *paint_data;
} GdkGLContextPrivate;
*minor = min;
}
+/**
+ * gdk_gl_context_is_legacy:
+ * @context: a #GdkGLContext
+ *
+ * Whether the #GdkGLContext is in legacy mode or not.
+ *
+ * The #GdkGLContext must be realized.
+ *
+ * Returns: %TRUE if the GL context is in legacy mode
+ *
+ * Since: 3.20
+ */
+gboolean
+gdk_gl_context_is_legacy (GdkGLContext *context)
+{
+ GdkGLContextPrivate *priv = gdk_gl_context_get_instance_private (context);
+
+ g_return_val_if_fail (GDK_IS_GL_CONTEXT (context), FALSE);
+ g_return_val_if_fail (priv->realized, FALSE);
+
+ return priv->is_legacy;
+}
+
+void
+gdk_gl_context_set_is_legacy (GdkGLContext *context,
+ gboolean is_legacy)
+{
+ GdkGLContextPrivate *priv = gdk_gl_context_get_instance_private (context);
+
+ priv->is_legacy = !!is_legacy;
+}
+
/**
* gdk_gl_context_realize:
* @context: a #GdkGLContext
void gdk_gl_context_get_version (GdkGLContext *context,
int *major,
int *minor);
+GDK_AVAILABLE_IN_3_20
+gboolean gdk_gl_context_is_legacy (GdkGLContext *context);
GDK_AVAILABLE_IN_3_16
void gdk_gl_context_set_required_version (GdkGLContext *context,
GdkGLContextProgram *current_program;
} GdkGLContextPaintData;
+void gdk_gl_context_set_is_legacy (GdkGLContext *context,
+ gboolean is_legacy);
+
void gdk_gl_context_upload_texture (GdkGLContext *context,
cairo_surface_t *image_surface,
int width,